package com.yawn.zerodefect.task;

import org.activiti.bpmn.model.FlowElement;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;

import javax.annotation.Resource;

/**
 * @author Created by yawn on 2018-01-26 10:00
 */
public class OvertimeRemind implements JavaDelegate {

    @Resource
    private RuntimeService runtimeService;

    @Override
    public void execute(DelegateExecution execution) {
        FlowElement currentFlowElement = execution.getCurrentFlowElement();
//        String assignee = (String) runtimeService.getVariable(execution.getId(), "assignee");
//        if (assignee == null) {
//
//        }
        String name = currentFlowElement.getName();
        System.out.println(name + " 超時提醒！");
    }
}
